package com.wisely.highlight_spring4.ch2.prepost;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @ClassName JSR250WayService
 * @Package com.wisely.highlight_spring.ch2.prepost
 * @Description TODO
 * @Author zjb
 * @Date 2018/7/20 10:50
 * @Version 1.0
 **/
public class JSR250WayService {
    //在构造函数执行完之后执行
    @PostConstruct
    public void init(){
        System.out.println("jsr250-init-method");
    }
    public JSR250WayService(){
        super();
        System.out.println("初始化构造函数-JSR250WayService");
    }
    //在Bean销毁之前执行
    @PreDestroy
    public void destroy(){
        System.out.println("jsr250-destory-method");
    }
}
